home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Hardware / MMKeyboard / Install / MMKeyboard.install < prev    next >
Encoding:
Text File  |  2002-03-13  |  34.4 KB  |  953 lines

  1. ; $VER: MMKeyboard.install 1.20 (29.01.2002)
  2. ; Install script for MMKeyboard (Workbench 2.0 or higher)
  3. ;
  4. (COMPLETE 0)
  5. ;(USER 2)
  6. (SET #ApplicationName "MMKeyboard")
  7. (SET #ApplicationDir  (EXPANDPATH "sys:tools"))
  8. (SET #ApplicationDir1 (EXPANDPATH "sys:utilities"))
  9. (SET #ApplicationDir2 "work:tools")
  10. (SET #ApplicationDir3 "tools:")
  11. (SET #ApplicationDir4 "work:utilities")
  12. (SET #ArchiveDir "/")
  13. (SET #Language -1)
  14. (SET #Documents -1)
  15. (SET #Keymaps 0)
  16. (SET #ApplicationKeyfile (CAT #ApplicationName ".key"))
  17. (SET #WBStartUp (EXPANDPATH "sys:WBStartup"))
  18. ;=============================================================================
  19. ; English strings
  20.  
  21. (SET default_lang 1)
  22.  
  23. (SET #bad-kick "You must have at least Workbench 2.0+")
  24. (SET #bad-installer
  25. (CAT "You have an old version of the program 'Installer' "
  26.      "on your Amiga!\n\nThe installation procedure needs at least Installer 42.9.\n\n"
  27.      "Please check your configuration!\n"
  28. ))
  29.  
  30. (SET #App-InstallMsg
  31. (CAT "\n\n%s Installation Script.\n\n"
  32.         "This script installs %s on your Amiga.\n\n"
  33.         "Read the guide file for more information\n"
  34.         " on the distribution of %s.\n\n"
  35.         "%s © 1995-2002 Guido Mersmann\n"
  36.         "All rights reserved."
  37. ))
  38. (SET #App-MainMode "Please choose mode:")
  39.  
  40. (SET #App-Where
  41. (CAT "Where would you like to install %s ?\n"
  42.         "(A drawer will be created)"
  43. ))
  44.  
  45. (SET #App-Update
  46. (CAT "\n\nA %s drawer does already exist in the selected "
  47.         " directory.\n\n By selecting \"Proceed\", you"
  48.         " indicate that you want to update the %s"
  49.         " installation with the most recent version.\n\n"
  50.         "Several %s specific files will be overwritten!"
  51. ))
  52.  
  53. (SET #App-Main "Which %s version should be installed ?")
  54. (SET #App-Main-help
  55. (CAT "The OS2.0+ version should only be used on Systems with OS2."
  56.      " The OS2.1+ and the OS3.0+ version need less Memory. Locale is required!"
  57.      " Special OS3.0+ functions are used to save more memory."
  58. ))
  59.  
  60. (SET #App-Language "Which languages should be installed ?")
  61. (SET #App-Language-help
  62. (CAT "\nThe Amiga can be operated in many different"
  63.           " languages."
  64.           "To reduce the amount of space consumed by the"
  65.           " language files, you can select to have only the"
  66.           " files of specific languages copied.\n\n"
  67.           "Simply check the boxes of the languages you wish"
  68.           " to have available on your system.\n\n"
  69.           @askoptions-help
  70. ))
  71.  
  72. (SET #App-Keymaps "Which keymaps should be installed ?")
  73.  
  74. (SET #App-Help "Which Amiga-guide files should be installed ?")
  75.  
  76. (SET #App-Exit "\n\n%s installed !!\n\n%s can be found in your \"%s\" drawer (or partiton).")
  77. ;--------- DEINSTALLATION STRINGS
  78. (SET #App-DeInstallWhere "Where is the location of %s ?\n")
  79. (SET #App-Install "Install")
  80. (SET #App-DeInstall "Deinstall")
  81. (SET #bad-DeInstall "There is no %s installation at the specified position!")
  82. (SET #StartupRemove-prompt "\nRemove %s lines within your user-startup?")
  83. (SET #Deinstall-Done "\n%s is now deinstalled.")
  84. ;=============================================================================
  85. ; German strings
  86.  
  87. (IF (= @language "deutsch")
  88. (
  89. (SET default_lang 2)
  90.  
  91. (SET #bad-kick "Sie benötigen Workbench 2.0 oder größer")
  92. (SET #bad-installer
  93. (CAT "Achtung! Es ist eine alte Version des Programmes 'Installer' "
  94.      "auf Ihrem Amiga!\n\nDie Installation benötigt mindestens Installer 42.9.\n\n"
  95.      "Bitte überprüfen Sie Ihre Konfiguration!\n"
  96. ))
  97.  
  98. (SET #App-InstallMsg
  99. (CAT "\n%s Installationsskript.\n\n"
  100.         "Dieses Skript installiert oder deinstalliert\n"
  101.         "%s auf Ihrem Amiga.\n\n"
  102.         "Lesen Sie die Anleitungsdatei für weitere Informationen"
  103.         " über den Vertrieb von %s.\n\n"
  104.         "%s © 1999-2002 Guido Mersmann\n"
  105.         "Alle Rechte reserviert."
  106. ))
  107. (SET #App-MainMode "Wählen Sie den gewünschten Vorgang:")
  108.  
  109. (SET #App-Where
  110. (CAT "Wo möchten Sie %s installieren ?\n"
  111.         "(Ein Verzeichnis wird angelegt)"
  112. ))
  113.  
  114. (SET #App-Update
  115. (CAT "\nEin %s-Verzeichnis existiert im ausgewählen"
  116.         " Verzeichnis.\n\n Wenn Sie fortfahren,"
  117.         " bestätigen Sie, daß Sie die alte %s-Installation"
  118.         " mit der neuesten Version überschreiben wollen.\n\n"
  119.         "Verschiedene %s-Dateien (z.B überflüssige Dateien) werden falls nötig überschrieben!"
  120. ))
  121.  
  122. (SET #App-Main "Welche Version von %s möchten Sie installieren?")
  123. (SET #App-Main-help
  124. (CAT "Die OS2.0+ Version läuft unter allen Systemen ab OS2.0."
  125.      " Die OS2.1+ Version hat den Nutzen, daß sie weniger Resourcen"
  126.      " benutzt, wenn sich %s im Hintergrund befindet. Dazu MUß"
  127.      " die Locale.library eingebunden sein. Für die OS3.0+ gilt das Selbe"
  128.      " wie für die OS2.1 Verison. Es werden OS3.0+ Routinen benutzt, die"
  129.      " weiteren Speicher sparen."
  130. ))
  131.  
  132. (SET #App-Language "Welche Sprachen sollen installiert werden ?")
  133.  
  134. (SET #App-Language-help
  135. (CAT "\nDer Amiga kann in vielen verschiedenen Sprachen"
  136.          " arbeiten. Um Plattenkapazität zu sparen können Sie"
  137.          " nur die Sprachen anwählen, die sie benötigen"
  138.          " Haken Sie also einfach die Sprachen ab, die Sie"
  139.          " Ihrem System zugänglich machen wollen."
  140.           @askoptions-help
  141. ))
  142.  
  143. (SET #App-Help "Welche Anleitungs- und Informationsdateien wollen Sie installieren ?")
  144.  
  145. (SET #App-Keymaps "Welche Keymaps wollen Sie installieren ?")
  146.  
  147. (SET #App-Exit "\n\n%s installiert!!\n\nSie finden %s im Verzeichnis \"%s\"")
  148. ;------- DEINSTALL STRINGS
  149. (SET #App-DeinstallWhere "Wo liegt %s auf Ihrer Platte ?\n")
  150. (SET #App-Install "%s Installieren")
  151. (SET #App-DeInstall "%s Deinstallieren")
  152. (SET #bad-DeInstall "Es gibt keine %s Installation an der angegeben Position")
  153. (SET #StartupRemove-prompt "\n\nDie zu %s gehörenden Einträge in der User-startup werden gelöscht!")))
  154. (SET #Deinstall-Done "\n%s ist jetzt deinstalliert!")
  155. ;=============================================================================
  156. ; français strings
  157.  
  158. (IF (= @language "français")
  159. (
  160. (SET default_lang 4)
  161.  
  162. (SET #bad-kick "Vous devez avoir le Workbench 2.0 au moins")
  163. (SET #bad-installer
  164. (CAT "Vous avez une ancienne version du programme 'Installer' "
  165.      "sur votre Amiga!\n\nLa procédure d'installation a besoin d'Installer 42.9 ou supérieur.\n\n"
  166.      "Veuillez vérifier votre configuration!\n"
  167. ))
  168.  
  169. (SET #App-InstallMsg
  170. (CAT "\n\nScript d'installation pour %s.\n\n"
  171.         "Ce script installe %s sur votre Amiga.\n\n"
  172.         "Lisez le guide pour de plus amples informations\n"
  173.         " sur cette distribution de %s.\n\n"
  174.         "%s © 1999-2002 Guido Mersmann\n"
  175.         "Tous droits réservés."
  176. ))
  177. (SET #App-MainMode "Veuillez choisir le mode:")
  178.  
  179. (SET #App-Where
  180. (CAT "Où voulez-vous installer %s ?\n"
  181.         "(Un tiroir sera crée)"
  182. ))
  183.  
  184. (SET #App-Update
  185. (CAT "\n\nUn tiroir %s existe déja dans le répertoire "
  186.         " sélectionné.\n\n En sélectionnant \"Continuer\", vous"
  187.         " indiquez que vous voulez mettre à jour l'installation"
  188.         " de %s par la version la plus récente.\n\n"
  189.         "Plusieurs fichiers spécifiques à %s vont être mis à jour!"
  190. ))
  191.  
  192. (SET #App-Main "Quelle version de %s doit être installée ?")
  193. (SET #App-Main-help
  194. (CAT "La version OS2.0+ ne devrait être utilisée que sur un système tournant sous AmigaOS 2."
  195.      " Les versions OS2.1+ et OS3.0+ utilisent moins de mémoire. Le système de localisation est nécéssaire!"
  196.      " Des fonction spéciales de l'OS3.0+ sont utilisées pour gagner plus de mémoire."
  197. ))
  198.  
  199. (SET #App-Language "Quelles langues doivent être installées ?")
  200. (SET #App-Language-help
  201. (CAT "\nL'Amiga peut être utilisé dans beaucoup de langues"
  202.           " différentes."
  203.           "Pour réduire la place utilisée par les fichiers de"
  204.           " localisation, vous pouvez choisir de n'avoir"
  205.           " que certaines langues spécifiques installées.\n\n"
  206.           "Sélectionnez simplement les cases à cocher correspondant aux"
  207.           " langues que vous voulez sur votre système.\n\n"
  208.           @askoptions-help
  209. ))
  210.  
  211. (SET #App-Help "Quels fichiers d'aide doivent être installés ?")
  212.  
  213. (SET #App-Keymaps "Which keymaps should be installed ?")
  214.  
  215. (SET #App-Exit "\n\n%s est installé !!\n\n%s se trouve dans le tiroir (ou la partition) \"%s\".")
  216. ;--------- DEINSTALLATION STRINGS
  217. (SET #App-DeInstallWhere "Où est situé %s ?\n")
  218. (SET #App-Install "Installer")
  219. (SET #App-DeInstall "Désinstaller")
  220. (SET #bad-DeInstall "Il n'y a aucune installation de %s à l'emplacement spécifié!")
  221. (SET #StartupRemove-prompt "\nSuppression des lignes relatives à %s dans votre user-startup?")
  222. (SET #Deinstall-Done "\n%s est maintenant désinstallé.")
  223. ;---------
  224. ))
  225. ;=============================================================================
  226. ; Español strings
  227.  
  228. (IF (= @language "español")
  229. (
  230. (SET default_lang 8)
  231.  
  232. (SET #bad-kick "Necesitas al menos Workbench 2.0+")
  233. (SET #bad-installer
  234. (CAT "Tienes una versión antigua del 'Installer' "
  235.      "en tu Amiga!\n\nEl proceso de instalación requiere al menos el Installer 42.9.\n\n"
  236.      "Revisa tu configuración!\n"
  237. ))
  238.  
  239. (SET #App-InstallMsg
  240. (CAT "\n\nGuión de instalación de %s .\n\n"
  241.         "Este script instala %s en tu Amiga.\n\n"
  242.         "Lee el amigaguide para más información\n"
  243.         " sobre la distribución de %s.\n\n"
  244.         "%s © 1999-2002 Guido Mersmann\n"
  245.         "Todos los derechos reservados."
  246. ))
  247. (SET #App-MainMode "Elige uno de los modos:")
  248.  
  249. (SET #App-Where
  250. (CAT "¿ Dónde quieres instalar %s ?\n"
  251.         "(Un cajón será creado)"
  252. ))
  253.  
  254. (SET #App-Update
  255. (CAT "\n\nYa existe un cajón %s en ese"
  256.         " directorio.\n\n Si seleccionas \"Seguir\","
  257.         " actualizarás la instalación %s"
  258.         " con la versión más reciente.\n\n"
  259.         "!Algunos ficheros específicos de %s serán sobreescritos¡"
  260. ))
  261.  
  262. (SET #App-Main "¿ Qué versión de %s quieres instalar ?")
  263. (SET #App-Main-help
  264. (CAT "La versión OS2.0+ sólo debería funcionar bajo sistemas con OS2."
  265.      " Las versiones OS2.1+ y OS3.0+ requieren menos Memoria. Necesitas Locale!"
  266.      " Algunas funciones del OS3.0+ reducen el consumo de memoria."
  267. ))
  268.  
  269. (SET #App-Language "¿ Qué lenguajes quieres instalar ?")
  270. (SET #App-Language-help
  271. (CAT "\nRl Amiga puede trabajar en numerosos lenguajes"
  272.           " diferentes."
  273.           "Parar reducir la cantidad de espacio necesaria para los"
  274.           " ficheros de lenguaje, puedes copiar sólo"
  275.           " los lenguajes específicos.\n\n"
  276.           "Marca las cajas de los lenguajes que quieras"
  277.           " tener disponibles en tu sistema.\n\n"
  278.           @askoptions-help
  279. ))
  280.  
  281. (SET #App-Help "¿Qué Amiga-guides queres instalar ?")
  282.  
  283. (SET #App-Keymaps "Which keymaps should be installed ?")
  284.  
  285. (SET #App-Exit "\n\n%s instalado !!\n\n%s está en el cajón \"%s\" (o partición).")
  286. ;--------- DEINSTALLATION STRINGS
  287. (SET #App-DeInstallWhere "¿ En qué directorio está %s ?\n")
  288. (SET #App-Install "Instalar")
  289. (SET #App-DeInstall "Desinstalar")
  290. (SET #bad-DeInstall "No hay instalación de %s en el lugar indicado")
  291. (SET #StartupRemove-prompt "\n¿ Elimino las líneas %s de tu fichero user-startup ?")
  292. (SET #Deinstall-Done "\n%s ha sido desinstalado.")
  293. ;---------
  294. ))
  295. ;=============================================================================
  296. ; Português strings
  297.  
  298. (IF (= @language "português")
  299. (
  300. (SET default_lang 16)
  301.  
  302. (SET #bad-kick "Você necessita pelo menos do Workbench 2.0+")
  303. (SET #bad-installer
  304. (CAT "Você tem uma versão antiga do 'Installer' "
  305.      "no seu Amiga!\n\nO processo de instalação requer no minimo o Installer 42.9.\n\n"
  306.      "Por favor verifique a sua configuração!\n"
  307. ))
  308.  
  309. (SET #App-InstallMsg
  310. (CAT "\n\nScript de instalação %s .\n\n"
  311.         "Este script instala %s no seu Amiga.\n\n"
  312.         "Leia o documento amigaguide para mais informações\n"
  313.         " acerca da distribução de %s.\n\n"
  314.         "%s © 1999-2002 Guido Mersmann\n"
  315.         "Todos os direitos reservados."
  316. ))
  317. (SET #App-MainMode "Por favor escolha um dos modos:")
  318.  
  319. (SET #App-Where
  320. (CAT "Onde deseja instalar %s ?\n"
  321.         "(Será criado uma gaveta)"
  322. ))
  323.  
  324. (SET #App-Update
  325. (CAT "\n\njá existe uma gaveta %s nesse"
  326.         " directório.\n\n Se seleccionar \"Proceguir\", você"
  327.         " indicará que deseja actualizar a instalação %s"
  328.         " para a versão mais recente.\n\n"
  329.         "Alguns ficheiros específicos em %s seram sobstituidos!"
  330. ))
  331.  
  332. (SET #App-Main "Que versão de %s deseja instalar ?")
  333. (SET #App-Main-help
  334. (CAT "A versão OS2.0+ só deve ser usada em Sistemas com o OS2."
  335.      " As versões OS2.1+ e OS3.0+ requerem menos Memória. Necessita do Locale!"
  336.      " Algumas funções do OS3.0+ reduzem o consumo de memória."
  337. ))
  338.  
  339. (SET #App-Language "Que idioma deseja instalar ?")
  340. (SET #App-Language-help
  341. (CAT "\nO Amiga pode funcionar com vários idiomas"
  342.           " diferentes."
  343.           "Para reduzir a quantidade de espaço necessário para os"
  344.           " ficheiros de idiomas, você pode copiar só"
  345.           " os idiomas que quiser.\n\n"
  346.           "Simplesmente veja as gavetas dos idiomas que quer"
  347.           " ter disponíveis no seu Sistema.\n\n"
  348.           @askoptions-help
  349. ))
  350.  
  351. (SET #App-Help "Que documentos Amiga-guides deseja instalar ?")
  352.  
  353. (SET #App-Keymaps "Which keymaps should be installed ?")
  354.  
  355. (SET #App-Exit "\n\n%s instalado !!\n\n%s pode ser encontrado na gaveta \"%s\" (ou partição).")
  356. ;--------- DEINSTALLATION STRINGS
  357. (SET #App-DeInstallWhere "Em que directório está %s ?\n")
  358. (SET #App-Install "Instalar")
  359. (SET #App-DeInstall "Desinstalar")
  360. (SET #bad-DeInstall "Não existe nenhuma instalação de %s no lugar indicado")
  361. (SET #StartupRemove-prompt "\nRemovo as linhas %s no seu ficheiro user-startup ?")
  362. (SET #Deinstall-Done "\n%s foi agora desinstalado.")
  363. ;---------
  364. ))
  365. ;=============================================================================
  366. ; Polish strings
  367.  
  368. (IF (= @language "polski")
  369. (
  370. (SET default_lang 32)
  371.  
  372. (SET #bad-kick "Ten program wymaga co najmniej systemu Workbench 2.0+")
  373. (SET #bad-installer
  374. (CAT "Na swojej Amidze masz starâ wersjë 'Installera' !"
  375.      "\nTen skrypt wymaga Installera w wersji 42.0.\n\n"
  376.      "Proszë sprawdú swojâ konfiguracjë!\n"
  377. ))
  378.  
  379. (SET #App-InstallMsg
  380. (CAT "\n\nSkrypt instalujâcy %s.\n\n"
  381.         "Ten skrypt zainstaluje %s na Twojej Amidze.\n\n"
  382.         "Wiëcej informacji o dystrybucji %s\n"
  383.         " znajdziesz w dokumentacji.\n\n"
  384.         "%s © 1999-2002 Guido Mersmann\n"
  385.         "Wszelkie prawa zatrzeûone."
  386. ))
  387. (SET #App-MainMode "Wybierz tryb:")
  388.  
  389. (SET #App-Where
  390. (CAT "Gdzie chcesz zainstalowaê %s ?\n"
  391.         "(Katalog zostanie utworzony)"
  392. ))
  393.  
  394. (SET #App-Update
  395. (CAT "\n\nKatalog %s istnieje juû w wybranym miejscu"
  396.         "\n\n Wybierz  \"Proceed\", "
  397.         " jeûeli chcesz dokonaê aktualizacji %s"
  398.         " z najnowszâ dostëpnâ wersjâ.\n\n"
  399.         "Kilka plików %s zostanie zapisanych na nowo!"
  400. ))
  401.  
  402. (SET #App-Main "Która wersja %s powinna zostaê zainstalowana?")
  403. (SET #App-Main-help
  404. (CAT "Wersja OS2.0+ powinna byê uûywana na systemach OS2."
  405.      " Wersje OS2.1+ i OS3.0+ potrzebujâ mniej pamiëci. Wymagajâ jednak lokalizacji!"
  406.      " Specjane funkcje OS3.0+ uûywane sâ aby zmniejszyê zuûycie pamiëci."
  407. ))
  408.  
  409. (SET #App-Language "Które jëzyki powinny zostaê zainstalowane?")
  410. (SET #App-Language-help
  411. (CAT "\nAmiga moûe dziaîaê w wielu róûnych"
  412.           " jëzykach."
  413.           "Aby zmniejszyê iloôê uûywanego przez pliki"
  414.           " z tîumaczeniami, powinieneô wybraê tylko interesujâce"
  415.           " Cië pliki.\n\n"
  416.           "Po prostu zaznacz odpowiednie jëzyki, które chcesz"
  417.           " mieê zainstalowane na swoim dysku.\n\n"
  418.           @askoptions-help
  419. ))
  420.  
  421. (SET #App-Help "Które pliki Amiga-guide powinny zostaê zainstalowane?")
  422.  
  423. (SET #App-Keymaps "Which keymaps should be installed ?")
  424.  
  425. (SET #App-Exit "\n\n%s zostaî zaistalowany!!\n\n%s znajdziesz w katalogu \"%s\".")
  426. ;--------- DEINSTALLATION STRINGS
  427. (SET #App-DeInstallWhere "Gdzie znajduje sië %s ?\n")
  428. (SET #App-Install "Instaluj")
  429. (SET #App-DeInstall "Odinstaluj")
  430. (SET #bad-DeInstall "W wybranym miejscu nie ma %s !")
  431. (SET #StartupRemove-prompt "\nUsunâê linie %s ze swojego pliku user-startup?")
  432. (SET #Deinstall-Done "\n%s zostaî odinstalowany.")
  433. ;---------
  434. ))
  435. ;=============================================================================
  436.  
  437. ;----------------------------------------------------------------------------
  438. ;----------------------------------------------------------------------------
  439. ;       P_Requirements
  440. ;----------------------------------------------------------------------------
  441. ;----------------------------------------------------------------------------
  442. (PROCEDURE P_Requirements
  443. ; Workbench 37 or better required
  444. (IF (< (/ (getversion) 65536) 37)
  445. (
  446.   (abort #bad-kick)
  447. )
  448. )
  449. ; Installer 42.9 or better required
  450. (if (< @installer-version 2752521)
  451. (
  452. (abort #bad-installer)
  453. )
  454. ) ;if
  455. ) ;PROCDURE
  456. ;----------------------------------------------------------------------------
  457. ;----------------------------------------------------------------------------
  458. ;       P_DeInstall
  459. ;----------------------------------------------------------------------------
  460. ;----------------------------------------------------------------------------
  461. (PROCEDURE P_DeInstall #InstallerMode
  462.  
  463. (SET #Dummy             (ASKCHOICE
  464.                         (PROMPT #App-MainMode)
  465.                         (HELP @askchoice-help)
  466.                         (CHOICES
  467.                                 (#App-Install #ApplicationName)
  468.                                 (#App-Deinstall #ApplicationName)
  469.                         )
  470.                         ;(DEFAULT #Documents)
  471.                         )
  472. )
  473. ) ;PROCDURE
  474. ;----------------------------------------------------------------------------
  475. ;----------------------------------------------------------------------------
  476. ;       GetApplicationDir
  477. ;----------------------------------------------------------------------------
  478. ;----------------------------------------------------------------------------
  479. (PROCEDURE P_GetApplicationDir
  480. (SET #Dummy #ApplicationDir)
  481. (if (= (exists (TACKON #ApplicationDir1 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir1))
  482. (if (= (exists (TACKON #ApplicationDir2 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir2))
  483. (if (= (exists (TACKON #ApplicationDir3 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir3))
  484. (if (= (exists (TACKON #ApplicationDir4 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir4))
  485.  
  486. (SET #ApplicationDir
  487.         (TACKON
  488.                 (ASKDIR
  489.                         (PROMPT (#App-Where #ApplicationName))
  490.                         (HELP @askdir-help)
  491.                         (default #Dummy)
  492.                 )
  493.                 #ApplicationName
  494.         )
  495. )
  496. (SET @default-dest #ApplicationDir)
  497. ) ;PROCEDURE
  498. ;----------------------------------------------------------------------------
  499. ;----------------------------------------------------------------------------
  500. ;       GetDeinstallDir
  501. ;----------------------------------------------------------------------------
  502. ;----------------------------------------------------------------------------
  503. (PROCEDURE P_GetDeInstallDir
  504. (SET #Dummy #ApplicationDir)
  505. (if (= (exists (TACKON #ApplicationDir1 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir1))
  506. (if (= (exists (TACKON #ApplicationDir2 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir2))
  507. (if (= (exists (TACKON #ApplicationDir3 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir3))
  508. (if (= (exists (TACKON #ApplicationDir4 #ApplicationName) (NOREQ)) 2) (SET #Dummy #ApplicationDir4))
  509.  
  510. (SET #ApplicationDir
  511.                 (ASKDIR
  512.                         (PROMPT (#App-DeInstallWhere #ApplicationName))
  513.                         (HELP @askdir-help)
  514.                         (default #Dummy)
  515.                 )
  516. )
  517.          (SET #Dummy (EXISTS (TACKON #Applicationdir #ApplicationName)))
  518.  
  519.         (Select #Dummy
  520.          (abort (#bad-DeInstall #ApplicationName))
  521.          (SET #Applicationdir #Applicationdir)
  522.          (SET #Applicationdir (TACKON #Applicationdir #ApplicationName))
  523.         ) ;Select
  524. (SET @default-dest #ApplicationDir)
  525.  
  526. ) ;PROCEDURE
  527. ;----------------------------------------------------------------------------
  528. ;----------------------------------------------------------------------------
  529. ;       Ask for Catalogs
  530. ;----------------------------------------------------------------------------
  531. ;----------------------------------------------------------------------------
  532. (PROCEDURE P_AskCatalogs #Language
  533.  
  534. (SET #Dummy     (ASKOPTIONS
  535.                 (PROMPT #App-Language)
  536.                 (HELP #App-Language-help)
  537.                 (CHOICES
  538.                         "English"
  539.                         "Deutsch"
  540.                 )
  541.                 (DEFAULT default_lang)
  542.         )
  543. )
  544.  
  545. (IF (AND (> #Binary 0) (= #Dummy 0))
  546.  (SET #Dummy 1)
  547. )
  548. (IF (= #Binary 0)
  549.  (SET #Dummy (BITAND #Dummy (BITNOT 1)))
  550. )
  551. (SET #Dummy #Dummy) ;Return #Dummy
  552. ) ;PROCEDURE
  553. ;----------------------------------------------------------------------------
  554. ;----------------------------------------------------------------------------
  555. ;       Copy Selected Catalogs
  556. ;----------------------------------------------------------------------------
  557. ;----------------------------------------------------------------------------
  558. (PROCEDURE P_CopyCatalogs #Language
  559. (SET n 0)
  560. (SET #DestinationRoot (TACKON #ApplicationDir "Catalogs"))
  561. (SET #SourceRoot (TACKON #ArchiveDir "Catalogs"))
  562. (MAKEDIR #DestinationRoot)
  563.  
  564. (while (< n 2)
  565.         (SET #Dummy (SELECT n "english" "deutsch"))
  566.         (
  567.                 (IF (IN #Language n)
  568.                 (
  569.         (MAKEDIR (TACKON #DestinationRoot #Dummy))
  570.                         (COPYFILES
  571.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  572.                                 (DEST (TACKON #DestinationRoot #Dummy))
  573.                                 (HELP @copyfiles-help)
  574.                                 (ALL)
  575.                         )
  576.                 )
  577.                 )
  578.         )
  579. (SET n (+ n 1))
  580. )
  581. ) ;PROCEDURE
  582. ;----------------------------------------------------------------------------
  583. ;----------------------------------------------------------------------------
  584. ;       Ask for Help
  585. ;----------------------------------------------------------------------------
  586. ;----------------------------------------------------------------------------
  587. (PROCEDURE P_AskHelp #Documents
  588. (SET #Dummy             (ASKOPTIONS
  589.                         (PROMPT #App-Help)
  590.                         (HELP @askoptions-help)
  591.                         (CHOICES
  592.                                 "english"
  593.                                 "deutsch"
  594.                         )
  595.                         (DEFAULT default_lang)
  596.                   )
  597. )
  598. ) ;PROCEDURE
  599. ;----------------------------------------------------------------------------
  600. ;----------------------------------------------------------------------------
  601. ;       Copy Help
  602. ;----------------------------------------------------------------------------
  603. ;----------------------------------------------------------------------------
  604. (PROCEDURE P_CopyHelp #Documents
  605. (SET n 0)
  606. (SET #DestinationRoot (TACKON #ApplicationDir "Help"))
  607. (SET #SourceRoot (TACKON #ArchiveDir "Help"))
  608. (MAKEDIR #DestinationRoot)
  609.  
  610. (while (< n 2)
  611.         (SET #Dummy (SELECT n
  612.                 "english"
  613.                 "deutsch"
  614.                      )
  615.         )
  616.         (
  617.                 (IF (IN #Documents n)
  618.                 (
  619.         (MAKEDIR (TACKON #DestinationRoot #Dummy))
  620.                         (COPYFILES
  621.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  622.                                 (DEST (TACKON #DestinationRoot #Dummy))
  623.                                 (HELP @copyfiles-help)
  624.                                 (INFOS)
  625.                                 (ALL)
  626.                         )
  627.                 )
  628.                 )
  629.         )
  630. (SET n (+ n 1))
  631. )
  632. ) ;PROCEDURE
  633. ;----------------------------------------------------------------------------
  634. ;----------------------------------------------------------------------------
  635. ;       Copy_Dir (Dir)
  636. ;----------------------------------------------------------------------------
  637. ;----------------------------------------------------------------------------
  638. (PROCEDURE P_CopyDir #Dummy
  639.  
  640. (SET #DestinationRoot (TACKON #ApplicationDir #Dummy))
  641. (SET #SourceRoot (TACKON #ArchiveDir #Dummy))
  642. (MAKEDIR #DestinationRoot)
  643.  
  644.                    (COPYFILES
  645.         (SOURCE #SourceRoot)
  646.         (DEST #DestinationRoot)
  647.         (HELP @copyfiles-help)
  648.         (OPTIONAL <force>)
  649.         (ALL)
  650.         (INFOS)
  651.                    )
  652. ) ;PROCEDURE
  653. ;----------------------------------------------------------------------------
  654. ;----------------------------------------------------------------------------
  655. ;       Copy_File (Name)
  656. ;----------------------------------------------------------------------------
  657. ;----------------------------------------------------------------------------
  658. (PROCEDURE P_CopyFile #Dummy
  659.  
  660. (if (<> (exists (TACKON #ArchiveDir #Dummy) (noreq)) 0) 
  661. (
  662.                    (COPYFILES
  663.         (SOURCE (TACKON #ArchiveDir #Dummy))
  664.         (DEST #ApplicationDir)
  665.         (HELP @copyfiles-help)
  666.         (OPTIONAL <force>)
  667.         (ALL)
  668.         (INFOS)
  669.                    )
  670. )
  671. ) ;If
  672. ) ;PROCEDURE
  673. ;----------------------------------------------------------------------------
  674. ;----------------------------------------------------------------------------
  675. ;       P_Update
  676. ;----------------------------------------------------------------------------
  677. ;----------------------------------------------------------------------------
  678. (PROCEDURE P_Update
  679. (if (= (exists #ApplicationDir) 2)
  680.         (message (#App-Update #ApplicationName #ApplicationName #ApplicationName))
  681. )
  682. ) ;PROCEDURE
  683. ;----------------------------------------------------------------------------
  684. ;----------------------------------------------------------------------------
  685. ;       P_AskBinary
  686. ;----------------------------------------------------------------------------
  687. ;----------------------------------------------------------------------------
  688. (PROCEDURE P_AskBinary
  689. (set #Dummy (/ (getversion) 65536))
  690.  
  691. (if (= #Dummy 37) (set #Binary 0))
  692. (if (= #Dummy 38) (set #Binary 1))
  693. (if (>= #Dummy 39) (set #Binary 2))
  694.  
  695. (set #Dummy (/ (getversion "icon.library" (Resident)) 65536))
  696. (if (>= #Dummy 44) (set #Binary 2))
  697.  
  698. (set #Binary (askchoice
  699.         (prompt (#App-Main #ApplicationName))
  700.         (help (#App-Main-help #ApplicationName))
  701.         (choices
  702.                         "OS2.0+"
  703.                         "OS2.1+"
  704.                         "OS3.0+"
  705.                         )
  706.         (default #Binary)
  707.             )
  708. )
  709. ) ;PROCEDURE
  710. ;----------------------------------------------------------------------------
  711. ;----------------------------------------------------------------------------
  712. ;       P_CopyBinary
  713. ;----------------------------------------------------------------------------
  714. ;----------------------------------------------------------------------------
  715. (PROCEDURE P_CopyBinary #Dummy
  716.  
  717. (set #BinaryName (SELECT #Binary #Dummy (CAT "Bin/" #Dummy "_OS21") (CAT "Bin/" #Dummy "_OS30") (CAT "Bin/" #Dummy "_OS35") ))
  718. (copyfiles
  719.         (source (tackon #ArchiveDir #BinaryName) (infos))
  720.         (dest #ApplicationDir)
  721.         (newname #Dummy)
  722.         (help @copyfiles-help)
  723.         (optional <force>)
  724. )
  725. ) ;PROCEDURE
  726. ;----------------------------------------------------------------------------
  727. ;----------------------------------------------------------------------------
  728. ;       P_MoveWBStartUp
  729. ;----------------------------------------------------------------------------
  730. ;----------------------------------------------------------------------------
  731. (PROCEDURE P_MoveWBStartUp #Dummy
  732.  
  733.         (COPYFILES
  734.         (SOURCE (TACKON #ApplicationDir (CAT #Dummy ".info")))
  735.         (DEST #WBStartUp)
  736.         (HELP @copyfiles-help)
  737.         (OPTIONAL <force>)
  738.         (ALL)
  739.         )
  740.  
  741.         (TOOLTYPE
  742.         (DEST (TACKON #WBStartUp #Dummy))
  743.         (SETDEFAULTTOOL (TACKON #ApplicationDir #Dummy))
  744.         (NOPOSITION)
  745.         (SAFE)
  746.         )
  747. ) ;PROCEDURE
  748. ;----------------------------------------------------------------------------
  749. ;----------------------------------------------------------------------------
  750. ;       P_KeyFile
  751. ;----------------------------------------------------------------------------
  752. ;----------------------------------------------------------------------------
  753. (PROCEDURE P_KeyFile
  754.  
  755. (SET #Dummy (tackon (tackon #ArchiveDir "Keyfile") #ApplicationKeyfile))
  756.  
  757. (if (<> (exists #Dummy (noreq)) 0) ((P_CopyDir "KeyFile"))
  758. )
  759. ) ;PROCEDURE
  760. ;----------------------------------------------------------------------------
  761. ;----------------------------------------------------------------------------
  762. ;       P_CopyArchiveIcon
  763. ;----------------------------------------------------------------------------
  764. ;----------------------------------------------------------------------------
  765. (PROCEDURE P_CopyArchiveIcon
  766.                    (COPYFILES
  767.         (SOURCE (CAT (CAT (TACKON #ArchiveDir "/") #ApplicationName) ".info"))
  768.         (DEST (TACKON #ApplicationDir "/"))
  769.         (HELP @copyfiles-help)
  770.                    )
  771. ) ;PROCEDURE
  772. ;----------------------------------------------------------------------------
  773. ;----------------------------------------------------------------------------
  774. ;       P_AskBool
  775. ;----------------------------------------------------------------------------
  776. ;----------------------------------------------------------------------------
  777. (PROCEDURE P_AskBool #dummy
  778.  (SET #dummy (ASKBOOL      (prompt #dummy)
  779.            (help @askbool-help)
  780.            (default 1)
  781.              )
  782.  )
  783. ) ;PROCEDURE
  784. ;----------------------------------------------------------------------------
  785. ;----------------------------------------------------------------------------
  786. ;       Ask for Keymap
  787. ;----------------------------------------------------------------------------
  788. ;----------------------------------------------------------------------------
  789. (PROCEDURE P_AskKeymap #Keymaps
  790. (SET #Dummy             (ASKOPTIONS
  791.                         (PROMPT #App-Keymaps)
  792.                         (HELP @askoptions-help)
  793.                         (CHOICES
  794.                                 "Usa"
  795.                                 "Usa2"
  796.                                 "Deutsch"
  797.                                 "Français"
  798.                                 "British"
  799.                                 "Español"
  800.                                 "Svenska"
  801.                         )
  802.                         (DEFAULT 0)
  803.                   )
  804. )
  805. ) ;PROCEDURE
  806. ;----------------------------------------------------------------------------
  807. ;----------------------------------------------------------------------------
  808. ;       Copy Keymap
  809. ;----------------------------------------------------------------------------
  810. ;----------------------------------------------------------------------------
  811. (PROCEDURE P_CopyKeymap #Keymaps
  812. (SET n 0)
  813. (SET #DestinationRoot "Keymaps:")
  814. (SET #SourceRoot (TACKON #ArchiveDir "Keymaps/"))
  815. (MAKEDIR #DestinationRoot)
  816.  
  817. (while (< n 7)
  818.         (SET #Dummy (SELECT n
  819.                 "Win_usa"
  820.                 "Win_usa2"
  821.                 "Win_d"
  822.                 "Win_f"
  823.                 "Win_gb"
  824.                 "Win_e"
  825.                 "Win_s"
  826.                      )
  827.         )
  828.         (
  829.                 (IF (IN #Keymaps n)
  830.                 (
  831.                         (COPYFILES
  832.                                 (SOURCE (TACKON #SourceRoot #Dummy))
  833.                                 (DEST #DestinationRoot)
  834.                                 (HELP @copyfiles-help)
  835.                                 (INFOS)
  836.                                 (ALL)
  837.                         )
  838.                 )
  839.                 )
  840.         )
  841. (SET n (+ n 1))
  842. )
  843. ) ;PROCEDURE
  844. ;----------------------------------------------------------------------------
  845. ;----------------------------------------------------------------------------
  846. ;       MAIN
  847. ;----------------------------------------------------------------------------
  848. ;----------------------------------------------------------------------------
  849. (P_Requirements)
  850. (message (#App-installmsg #ApplicationName #ApplicationName #ApplicationName #ApplicationName))
  851. (SET #InstallerMode (P_DeInstall))
  852. (welcome)
  853. ;-----------------------------------------------
  854. (IF (= #InstallerMode "0")
  855. (
  856. ;-----------------------------------------------
  857.  (SET #ApplicationDir (P_GetApplicationDir))
  858.  
  859. (COMPLETE 1)
  860.  (P_Update)
  861.  (SET #Binary (P_AskBinary))
  862. (COMPLETE 2)
  863.  (SET #Language (P_AskCatalogs #Language))
  864. (COMPLETE 3)
  865.  (SET #Documents (P_AskHelp #Documents))
  866. (COMPLETE 4)
  867.  (SET #Keymaps (P_AskKeymap #Keymaps))
  868.  
  869. ;***** Delete old Data and Prefs *****
  870. (DELETE (TACKON #WBStartUp #ApplicationName) (optional FORCE))
  871. (Delete (TACKON #ApplicationDir "Presets/PasswordGUIs/Simple.ilbm"))
  872. (Delete (TACKON #ApplicationDir "Presets/PasswordGUIs/Simple.ilbm.info"))
  873. (Delete (TACKON #ApplicationDir "Presets/PasswordGUIs/SmurfGift.ilbm"))
  874. (Delete (TACKON #ApplicationDir "Presets/PasswordGUIs/SmurfGift.ilbm.info"))
  875. (Delete (TACKON #ApplicationDir "Presets/PasswordGUIs/Smurf2.ilbm"))
  876. (Delete (TACKON #ApplicationDir "Presets/PasswordGUIs/Smurf2.ilbm.info"))
  877. (Delete (TACKON #ApplicationDir "Presets/PasswordGUIs/Logo.ilbm"))
  878. (Delete (TACKON #ApplicationDir "Presets/PasswordGUIs/Logo.ilbm.info"))
  879. (Delete (TACKON #ApplicationDir "Presets/PasswordGUIs/GUI.ilbm"))
  880. (Delete (TACKON #ApplicationDir "Presets/PasswordGUIs/GUI.ilbm.info"))
  881.  
  882. ;***** Create empty Drawers *****
  883. (MAKEDIR #ApplicationDir)
  884. (MAKEDIR (TACKON #ApplicationDir "Prefs"))
  885.  
  886. (COMPLETE 10)
  887. (DELETE (TACKON #ApplicationDir "bin") (optional FORCE) (ALL))
  888.  (P_CopyBinary "MMKeyboard")
  889.  (P_CopyFile "MMKeyboard.info")
  890.  (P_CopyBinary "MMKeyboardPrefs")
  891.  (P_CopyFile "MMKeyboardPrefs.info")
  892. (COMPLETE 20)
  893. (DELETE (TACKON #ApplicationDir "catalogs") (optional FORCE) (ALL))
  894.  (P_CopyCatalogs #Language)
  895. (COMPLETE 30)
  896. (DELETE (TACKON #ApplicationDir "Help") (optional FORCE) (ALL))
  897.  (P_CopyHelp #Documents)
  898.  (P_CopyKeymap #Keymaps)
  899. (COMPLETE 40)
  900.  (P_CopyDir "BinPIC")
  901. (COMPLETE 50)
  902.  (P_CopyDir "Presets")
  903. (COMPLETE 60)
  904.  (P_MoveWBStartUp "MMKeyboard")
  905. (COMPLETE 70)
  906.  (P_CopyDir "Help/Pictures")
  907.  (P_Keyfile)
  908. (COMPLETE 80)
  909.  (P_CopyArchiveIcon)
  910.  (P_CopyFile "Help.info")
  911.  (P_CopyFile "Presets.info")
  912.  (P_CopyFile "Warning")
  913.  
  914. (COMPLETE 90)
  915. ;-----
  916. (DELETE (TACKON #ApplicationDir "Prefs.info"))
  917. (DELETE (TACKON #ApplicationDir "BinPIC.info"))
  918.  
  919. (run "c:avail Flush")
  920. (COMPLETE 100)
  921. (message (#App-exit #ApplicationName #ApplicationName #ApplicationDir))
  922. (exit (QUIET))
  923. ;-----------------------------------------------
  924. )) ;IF #InstallerMode = 0
  925. ;-----------  Deinstallation -------------------
  926. (IF (= #InstallerMode "1") (
  927.  
  928. (COMPLETE 10)
  929. (SET #ApplicationDir (P_GetDeInstallDir))
  930. (COMPLETE 20)
  931. (DELETE #ApplicationDir (ALL) (optional FORCE))
  932. (COMPLETE 60)
  933. (DELETE (CAT #ApplicationDir ".info") (optional FORCE))
  934. (COMPLETE 70)
  935. (DELETE (CAT (TACKON "ENV:" #ApplicationName) ".prefs")(optional FORCE))
  936. (COMPLETE 80)
  937. (DELETE (CAT (TACKON "ENVARC:" #ApplicationName) ".prefs")(optional FORCE))
  938. (COMPLETE 90)
  939. (DELETE (CAT (TACKON "ENV:" #ApplicationName) "Prefs.prefs")(optional FORCE))
  940. (COMPLETE 93)
  941. (DELETE (CAT (TACKON "ENVARC:" #ApplicationName) "Prefs.prefs")(optional FORCE))
  942. (COMPLETE 99)
  943. (DELETE (CAT (TACKON #WBStartUp #ApplicationName) ".info")(optional FORCE))
  944. (COMPLETE 100)
  945.  
  946. (Message (#Deinstall-Done #ApplicationName))
  947. (exit (QUIET))
  948.  
  949. ;-----------------------------------------------
  950. )) ;IF #InstallerMode = 1
  951. ;-----------------------------------------------
  952.  
  953.